package demo2;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: liangyuanzhang
 * Date: 2025-3-08
 * Time: 10:51
 */
public class Test {

    public static void fun(){
        int[] array = new int[]{1,2,3};
        try {
            System.out.println(array[6]);
        }catch (ArrayIndexOutOfBoundsException e){
            System.out.println("异常捕获...");
        }
    }

    public static void main(String[] args) {
        fun();
    }
}
